import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from "./store";

//三级联动组件---全局组件
import TypeNav from "./components/TypeNav";
import Carousel from "./components/swiper/Carousel";
import Pagination from "./components/Pagination";
import { Button, MessageBox } from 'element-ui';

//第一个参数: 全局组件的名字  第二个参数: 哪一个组件
Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.component(Pagination.name, Pagination)
//element-ui
Vue.component(Button.name, Button);
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;


//引入mockServer.js
import './mock/mockServer'
//引入swiper.css
import 'swiper/css/swiper.css'

//懒加载
import VueLazyload from 'vue-lazyload'
import loading from '@/assets/images/loading.jpg'
Vue.use(VueLazyload, {
  loading
})

//引入自定义插件
import myPlugins from "./plugins/myPlugins";
Vue.use(myPlugins, {
  name: 'upper'
})

//引入表单校验插件
import '@/plugins/validate'


Vue.prototype.$bus = new Vue()
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
